<template>
  <div>
    <el-descriptions :column="2">
      <el-descriptions-item label="车牌号码">{{ carInfo.vehicleNumber }}</el-descriptions-item>
      <el-descriptions-item label="车辆类型">{{ carInfo.vehicleType }}</el-descriptions-item>
      <el-descriptions-item label="车辆颜色">{{ carInfo.color }}</el-descriptions-item>
      <el-descriptions-item label="轴数">{{ carInfo.axleCount }}</el-descriptions-item>
      <el-descriptions-item label="车辆联系人">{{ carInfo.contactsName }}</el-descriptions-item>
      <el-descriptions-item label="联系人身份证">{{ carInfo.contactsIdCard }}</el-descriptions-item>
      <el-descriptions-item label="联系方式">{{ carInfo.contactsPhone }}</el-descriptions-item>
      <el-descriptions-item label="证件有效期">{{ carInfo.expireDate }}</el-descriptions-item>
    </el-descriptions>
    <el-link type="primary" @click="junkToDataSearchDetail">详情</el-link>
  </div>
</template>

<script>
export default {
  name: 'CarDetail',
  components: {},
  props: {
    carInfo: {
      type: Object,
      require: true
    }
  },
  data() {
    return {}
  },
  created() {},
  mounted() {},
  computed: {},
  watch: {},
  methods: {
    junkToDataSearchDetail() {
      console.log(this.carInfo)
      this.$bus.$emit('dataSearchJunkToDetail', {
        id: this.carInfo.dataId,
        carNumber: this.carInfo.vehicleNumber
      })
    }
  }
}
</script>

<style scoped>
::v-deep .el-descriptions__body {
  background-color: unset;
  color: #ffffff;
}
</style>
